package projectEuler.net;

public class Problem_047 {
	private static int countNumberOfFactor(int[] lst){
		int cnt = 1;
		if(lst.length == 0) return 0;
		for(int i=0; i<lst.length-1; i++){
			if(lst[i]<lst[i+1]) cnt++;
		}
		return cnt;
	}
	public static int findSmallestOf4Consecutive(){
		for(int i = 1; ; i++)
			if((countNumberOfFactor(FactorierAnalize.analysToFactorier(i))==4)&&
					(countNumberOfFactor(FactorierAnalize.analysToFactorier(i+1))==4)&&
					(countNumberOfFactor(FactorierAnalize.analysToFactorier(i+2))==4)&&
					(countNumberOfFactor(FactorierAnalize.analysToFactorier(i+3))==4))
				return i;
	}
}
